<template>
<div>
<h2>实时拥堵情况</h2>
  <div id="mian" style="width:400px;height:300px;"></div>
  
  </div>
</template>

<script>
import * as echarts from 'echarts'
export default {
 mounted(){
    this.initEchart()
 },
 methods:{
    initEchart(){
        var myecart = echarts.init(document.getElementById('mian'))
        myecart.setOption({
            title: {
            },
            xAxis: {
                data: ['缓行', '拥堵', '严重拥堵']
            },
            
            yAxis: {},
            series: [
                {
                    name: '销量',
                    type: 'bar',
                    data: [392,983,1132]
                },
            ]
          
            })
    }
 }
}
</script>

<style>
h2{
  font-size: 26px;
  font-weight: bold;
  text-align: center;
}
</style>